/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AddURL.java
 *
 * Created on Dec 2, 2010, 6:36:48 PM
 */

package penny.downloadmanager.view.add;

import penny.downloadmanager.control.AddDialogControl;
import penny.downloadmanager.control.Application;
import penny.downloadmanager.model.gui.AddDialogModel;

/**
 *
 * @author john
 */
public class AddURL extends javax.swing.JPanel {

    private AddDialogModel addModel;

    public AddURL(AddDialogModel addModel) {
        this.addModel = addModel;
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        addDialogModel1 = addModel;
        jLabel1 = new javax.swing.JLabel();
        addURLText = new javax.swing.JTextField();

        jLabel1.setText("URL:"); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        addURLText.setName("addURLText"); // NOI18N

        org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, addDialogModel1, org.jdesktop.beansbinding.ELProperty.create("${addURL}"), addURLText, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(33, 33, 33)
                .addComponent(addURLText, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(addURLText, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        bindingGroup.bind();
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private penny.downloadmanager.model.gui.AddDialogModel addDialogModel1;
    private javax.swing.JTextField addURLText;
    private javax.swing.JLabel jLabel1;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables

}
